import time

# 方法1
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.remote.switch_to import SwitchTo

# 引入action chains
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

wd = webdriver.Chrome(service=Service(".\chromedriver_win136.exe"))
wd.implicitly_wait(10)
wd.get("https://swtesting-class-demo.koyeb.app/elements/")
# 图片路径
upload_file = "path"
ele = wd.find_element(By.ID, "imageUpload")
time.sleep(5)
ele.send_keys(upload_file)
time.sleep(10)
